package org.yate.oa.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.dao.mapper.MessageMapper;
import org.yate.oa.model.MessageEntity;
import org.yate.oa.service.IMessageService;

@Service
public class MessageService extends BaseService<MessageEntity, Integer> implements IMessageService {

	@Resource(name = "messageMapper")
	private MessageMapper messageDao;

	@Override
	public List<MessageEntity> getEntitiesBy(Integer tid) {
		return messageDao.getEntitiesBy(tid);
	}

	@Override
	protected IBaseMapperDao<MessageEntity, Integer> getMapperDao() {
		return this.messageDao;
	}

	@Override
	public List<MessageEntity> getNewEntitiesBy(Integer tid) {
		return messageDao.getNewEntitiesBy(tid);
	}

	@Override
	public void batchDelete(Integer tid) {
		messageDao.batchDelete(tid);
	}

}
